//
//  WMString-Utilities.h
//  Wonderful Moment
//
//  Created by cclv on 11/9/09.
//  Copyright 2009 Ucayee. All rights reserved.
//

#import <Foundation/Foundation.h>


@interface NSString (WMString_Utilities)

/*!
 @function   string2Date:
 @abstract   Change given string to NSDate
 @discussion If the given str is wrong, should return the current system date
 @param      dateStr A string include the date like "2009-11-09 11:14:41"
 @result     The NSDate object with given format
 */

+ (NSDate *)string2Date:(NSString *)dateStr;

/*!
 @function   stringFromCurrent:
 @abstract   Change given date string to "xxx ago" format
 @discussion If the given str is wrong, should return the current date
 @param      dateStr A string include the date like "2009-11-09 11:14:41" at least 10 characters
 @result     The string with "xxx ago", xxx: years, months, days, hours, minutes, seconds
 */
+ (NSString *)stringFromCurrent:(NSString *)dateStr;

// 当前时间戳 yyyy-MM-dd
+ (NSString *)currentTimeStamp;

// 时间戳转化为时间字符串 yyyy-MM-dd
+ (NSString *)timeStamp:(NSString *)stamp;
// 时间戳转化为时间字符串 yyyy.MM.dd
+ (NSString *)time2Stamp:(NSString *)stamp;
//  时间戳转化为时间字符串 yyyy/MM/dd
+ (NSString *)time3Stamp:(NSString *)stamp;
+ (NSString *)timeStampChinese:(NSString *)stamp;
+ (NSString *)string1FromCurrent:(NSString *)dateStr;

+ (NSString *)string2FromTimeInterval:(NSInteger)timeInterval;
+ (NSString *)currentTimeNumber;
+ (NSString *)timeStampAddTimer:(NSString *)stamp;
+ (NSString *)dataOrTimer:(NSString *)stamp;

+ (NSString *)timeModel:(NSString *)model Stamp:(NSString *)stamp;

/**
 *  将时间戳转换为类似格式:"昨天 上午10:09"或者"2012-08-10 凌晨07:09"
 *
 *  @param Str 时间戳
 *
 *  @return 格式化时间戳后的字符串
 */
+ (NSString *)changeTheDateString:(NSString *)str;

@end
